<?
/*
-------------------------------
Script - EvaGb
-------------------------------
File - locator.class.php
-------------------------------
Function - Класс локатор
-------------------------------
*/
class locator {
public $page,$save;
private $db,$tpl;
public $ver='1.0';
private static $locator;
   function __construct() {
       $this->page=filter($_GET['page'],'0-9');
   }
   function get() {
       if (!self::$locator) self::$locator=new locator();
       return self::$locator;
   }
   function db() {
       if (!$this->db)  $this->db=new db();
       return $this->db;
   }
   function tpl() {
       if (!$this->tpl)  $this->tpl=new tpl($GLOBALS['_gb_cnf']['tpl_dir'],array("cache_time"=>$GLOBALS['_gb_cnf']['cachetime']));
       return $this->tpl;
   }
}
?>
